package com.huilian.iotbox.admin.service.impl;

import com.huilian.iotbox.admin.dao.UserAgencyDao;
import com.huilian.iotbox.admin.service.UserAgencyService;
import com.huilian.iotbox.data.dto.UserAgencyDto;
import com.huilian.iotbox.data.vo.UserAgencyVo;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author: loong
 * @create: 2021-11-16 17:25
 **/
@Service
public class UserAgencyServiceImpl implements UserAgencyService {
    @Resource
    private UserAgencyDao userAgencyDao;

    @Override
    public void deleteByUserId(Integer userId) {
        userAgencyDao.deleteByUserId(userId);
    }

    @Override
    public void add(UserAgencyDto userAgencyDto) {
        userAgencyDao.add(userAgencyDto);
    }

    @Override
    public List<UserAgencyVo> findByUserId(Integer userId) {
        return userAgencyDao.findByUserId(userId);
    }
}
